package com.etc.order.common.service;

import com.etc.order.common.domain.OrderDetail;
import com.etc.order.common.domain.OrderMaster;

import java.util.List;

public interface OrderMasterService {

    /**
     * 创建订单
     * @param order
     * @param items
     * @return
     */
    public boolean createOrderMaster(OrderMaster order, List<OrderDetail> items);

    /**
     * 根据姓名查询订单信息(分页)
     * @param buyerName
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public List<OrderMaster> findOrderMasterListByName(String buyerName,int pageIndex,int pageSize);

    /**
     * 更新订单
     * @param
     * @return
     */
//    public boolean updateOrderMaster(OrderMaster orderMaster);

    OrderMaster findByOrderId(String orderId);

    List<OrderMaster> findAll(int pageIndex,int pageSize);

    int getTotalCount(String buyerName);

    int update(OrderMaster orderMaster);
}
